 /*
  * $Header: /cvsroot/eclipse/org.eclipse.osgi/osgi/src/org/osgi/framework/FrameworkUtil.java,v 1.8 2007/02/26 16:37:21 twatson Exp $
  *
  * Copyright (c) OSGi Alliance (2005, 2007). All Rights Reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */

 package org.osgi.framework;

 import org.eclipse.osgi.framework.internal.core.FilterImpl;

 /**
  * Framework Utility class.
  *
  * <p>
  * This class contains utility methods which access Framework functions that may
  * be useful to bundles.
  *
  * @since 1.3
  * @ThreadSafe
  * @version $Revision: 1.8 $
  */
 public class FrameworkUtil {
     /*
      * NOTE: A framework implementor may also choose to replace this class in
      * their distribution with a class that directly interfaces with the
      * framework implementation.
      */

     /**
      * FrameworkUtil objects may not be constructed.
      */
     private FrameworkUtil() {}
     
     /**
      * Creates a <code>Filter</code> object. This <code>Filter</code> object
      * may be used to match a <code>ServiceReference</code> object or a
      * <code>Dictionary</code> object.
      *
      * <p>
      * If the filter cannot be parsed, an {@link InvalidSyntaxException} will be
      * thrown with a human readable message where the filter became unparsable.
      *
      * @param filter The filter string.
      * @return A <code>Filter</code> object encapsulating the filter string.
      * @throws InvalidSyntaxException If <code>filter</code> contains an
      * invalid filter string that cannot be parsed.
      * @throws NullPointerException If <code>filter</code> is null.
      *
      * @see Filter
      */
     public static Filter createFilter(String filter)
             throws InvalidSyntaxException {
         return new FilterImpl(filter);
     }
 }

